package com.free.mini.study.controller;

import java.util.List;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.free.mini.common.base.ResultData;
import com.free.mini.core.server.api.StudyModuleApi;
import com.free.mini.core.server.vo.req.StudyModuleQueryReqVO;
import com.free.mini.core.server.vo.resp.StudyModuleQueryRespVO;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 学习模块
 * 
 * @author dongsufeng
 * @version 4.0
 * @date 2023/8/1 15:30
 */
@RestController
@RequestMapping("api/study/v1/module/")
@Slf4j
@RequiredArgsConstructor
public class StudyModuleController {

    private final StudyModuleApi studyModuleApi;

    /**
     * 模块列表
     * 
     * @return
     */
    @PostMapping("list")
    public ResultData<List<StudyModuleQueryRespVO>> list(@RequestBody StudyModuleQueryReqVO reqVO) {
        return studyModuleApi.list(reqVO);
    }
}
